<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<html lang="zh-cn" xml:lang="zh-cn">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="DC.Type" content="topic">
  <meta name="DC.Title" content="恢复GaussDB(DWS)">
  <meta name="product" content="">
  <meta name="DC.Relation" scheme="URI" content="zh-cn_topic_0000001792343022.html">
  <meta name="prodname" content="">
  <meta name="version" content="">
  <meta name="brand" content="30-OceanProtect 备份一体机 1.5.0-1.6.0 帮助中心">
  <meta name="DC.Publisher" content="20240320">
  <meta name="DC.Format" content="XHTML">
  <meta name="DC.Identifier" content="ZH-CN_TOPIC_0000001839222057">
  <meta name="DC.Language" content="zh-cn">
  <link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
  <title>恢复GaussDB(DWS)</title>
 </head>
 <body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px">
  <a name="ZH-CN_TOPIC_0000001839222057"></a><a name="ZH-CN_TOPIC_0000001839222057"></a>
  <h1 class="topictitle1">恢复GaussDB(DWS)</h1>
  <div>
   <p>当需要对已备份的GaussDB(DWS)进行恢复时，可以参考本节恢复GaussDB(DWS)至原位置或新位置。</p>
   <div class="section">
    <h4 class="sectiontitle">背景信息</h4>
    <p>支持使用备份副本、复制副本进行恢复。支持恢复至原位置（复制副本不支持恢复至原位置）或新位置。</p>
   </div>
   <div class="section">
    <h4 class="sectiontitle">前提条件</h4>
    <ul>
     <li>恢复前请确保恢复目标位置的数据目录剩余空间大于恢复副本缩减前大小，否则恢复将失败。</li>
     <li>表级恢复到新位置，恢复到新Schema前，请确保已在GaussDB(DWS)对应的数据库中创建该Schema，否则会导致恢复失败。</li>
    </ul>
   </div>
   <div class="section">
    <h4 class="sectiontitle">操作步骤</h4>
    <ol>
     <li id="ZH-CN_TOPIC_0000001839222057__zh-cn_topic_0000001397321757_li10796132225712"><span>选择<span class="uicontrol" id="ZH-CN_TOPIC_0000001839222057__zh-cn_topic_0000001839142377_uicontrol879104212548">“<span id="ZH-CN_TOPIC_0000001839222057__zh-cn_topic_0000001839142377_text1079164214547">数据利用</span> &gt; <span id="ZH-CN_TOPIC_0000001839222057__zh-cn_topic_0000001839142377_text1679164255414">副本数据</span> &gt; <span id="ZH-CN_TOPIC_0000001839222057__zh-cn_topic_0000001839142377_text364514912581">大数据</span> &gt; <span id="ZH-CN_TOPIC_0000001839222057__zh-cn_topic_0000001839142377_text1416113393018">GaussDB(DWS)</span>”</span>。</span></li>
     <li><span>您可以以GaussDB(DWS)资源维度或以副本维度查找副本，本节以资源维度为例进行说明。</span><p></p><p>在<span class="uicontrol">“<span>资源</span>”</span>页签，根据资源名称查找到需要恢复的资源，并单击资源名称。</p> <p></p></li>
     <li><span>依次选择年、月、天找到副本。</span><p></p><p>当时间上显示<span><img src="zh-cn_image_0000001792503022.png"></span>，即表示该月、该天存在副本。</p> <p></p></li>
     <li><span>指定副本进行恢复。</span><p></p>
      <ol type="a">
       <li>普通恢复
        <ol class="substepthirdol">
         <li>单击需要恢复的副本所在行的<span class="menucascade">“<span class="uicontrol"><span>更多</span></span> &gt; <span class="uicontrol"><span>恢复</span></span>”</span>。</li>
         <li>恢复GaussDB(DWS)至原位置或新位置。
          <div class="p">
           相关参数说明如<a href="#ZH-CN_TOPIC_0000001839222057__zh-cn_topic_0000001397321757_table13681910173115">表1</a>。 
           <div class="tablenoborder">
            <a name="ZH-CN_TOPIC_0000001839222057__zh-cn_topic_0000001397321757_table13681910173115"></a><a name="zh-cn_topic_0000001397321757_table13681910173115"></a>
            <table cellpadding="4" cellspacing="0" summary="" id="ZH-CN_TOPIC_0000001839222057__zh-cn_topic_0000001397321757_table13681910173115" frame="border" border="1" rules="all">
             <caption>
              <b>表1 </b>恢复GaussDB(DWS)
             </caption>
             <colgroup>
              <col style="width:32.019999999999996%">
              <col style="width:67.97999999999999%">
             </colgroup>
             <thead align="left">
              <tr>
               <th align="left" class="cellrowborder" valign="top" width="32.019999999999996%" id="mcps1.3.4.2.4.2.1.1.1.2.1.2.2.3.1.1"><p>参数</p></th>
               <th align="left" class="cellrowborder" valign="top" width="67.97999999999999%" id="mcps1.3.4.2.4.2.1.1.1.2.1.2.2.3.1.2"><p>说明</p></th>
              </tr>
             </thead>
             <tbody>
              <tr>
               <td class="cellrowborder" valign="top" width="32.019999999999996%" headers="mcps1.3.4.2.4.2.1.1.1.2.1.2.2.3.1.1 "><p><span>恢复至</span></p></td>
               <td class="cellrowborder" valign="top" width="67.97999999999999%" headers="mcps1.3.4.2.4.2.1.1.1.2.1.2.2.3.1.2 "><p id="ZH-CN_TOPIC_0000001839222057__zh-cn_topic_0000001397321757_p113681710143113">选择恢复至<span class="uicontrol" id="ZH-CN_TOPIC_0000001839222057__zh-cn_topic_0000001397321757_uicontrol2368161003111">“<span id="ZH-CN_TOPIC_0000001839222057__text817812023912">原位置</span>”</span>或<span class="uicontrol" id="ZH-CN_TOPIC_0000001839222057__zh-cn_topic_0000001397321757_uicontrol1336819106318">“<span id="ZH-CN_TOPIC_0000001839222057__text972973113394">新位置</span>”</span>。</p></td>
              </tr>
              <tr>
               <td class="cellrowborder" valign="top" width="32.019999999999996%" headers="mcps1.3.4.2.4.2.1.1.1.2.1.2.2.3.1.1 "><p><span>位置</span></p></td>
               <td class="cellrowborder" valign="top" width="67.97999999999999%" headers="mcps1.3.4.2.4.2.1.1.1.2.1.2.2.3.1.2 "><p id="ZH-CN_TOPIC_0000001839222057__zh-cn_topic_0000001397321757_p11368110193111">当选择恢复至<span class="uicontrol" id="ZH-CN_TOPIC_0000001839222057__zh-cn_topic_0000001397321757_uicontrol13368710153111">“<span id="ZH-CN_TOPIC_0000001839222057__text10541044183913">原位置</span>”</span>时，显示原位置。</p></td>
              </tr>
              <tr>
               <td class="cellrowborder" valign="top" width="32.019999999999996%" headers="mcps1.3.4.2.4.2.1.1.1.2.1.2.2.3.1.1 "><p><span>目标集群</span></p></td>
               <td class="cellrowborder" valign="top" width="67.97999999999999%" headers="mcps1.3.4.2.4.2.1.1.1.2.1.2.2.3.1.2 "><p id="ZH-CN_TOPIC_0000001839222057__zh-cn_topic_0000001397321757_p1136881063111">当选择恢复至<span class="uicontrol" id="ZH-CN_TOPIC_0000001839222057__zh-cn_topic_0000001397321757_uicontrol136861033116">“<span id="ZH-CN_TOPIC_0000001839222057__text0153529408">新位置</span>”</span>时，选择需要恢复的目标集群。您需要确认已将目标集群的安装配置文件（mppdb-install-config.xml，如果安装配置文件不为该名称，请重命名为该名称）复制到目标集群每个节点的/opt/DataBackup/目录下，并确保数据库用户有可读权限，否则会恢复失败。</p></td>
              </tr>
              <tr>
               <td class="cellrowborder" valign="top" width="32.019999999999996%" headers="mcps1.3.4.2.4.2.1.1.1.2.1.2.2.3.1.1 "><p><span>数据库</span></p></td>
               <td class="cellrowborder" valign="top" width="67.97999999999999%" headers="mcps1.3.4.2.4.2.1.1.1.2.1.2.2.3.1.2 "><p>对表集副本恢复至新位置时，需要选择恢复的目标数据库。</p></td>
              </tr>
             </tbody>
            </table>
           </div>
          </div></li>
         <li>单击<span class="uicontrol">“<span>确定</span>”</span>。</li>
         <li>系统弹出如下提示，确认提示内容后，单击<span class="uicontrol">“确定”</span>。<p><span><img src="zh-cn_image_0000001792343286.png"></span></p> <p></p></li>
        </ol></li>
       <li>表级恢复。
        <ol class="substepthirdol">
         <li>单击需要进行表级恢复的副本所在行的<span class="menucascade">“<span class="uicontrol"><span>更多</span></span> &gt; <span class="uicontrol"><span>表级恢复</span></span>”</span>。</li>
         <li>在<span class="uicontrol">“<span>已选择副本</span>”</span>中勾选需要恢复的表。</li>
         <li>选择需要恢复的目标位置，选择恢复至原位置或新位置。相关参数说明如<a href="#ZH-CN_TOPIC_0000001839222057__table1893111404012">表2</a>。
          <div class="note">
           <img src="public_sys-resources/note_3.0-zh-cn.png"><span class="notetitle"> </span>
           <div class="notebody">
            <p>仅1.6.0及以上版本支持表级恢复到新位置。</p>
           </div>
          </div>
          <div class="tablenoborder">
           <a name="ZH-CN_TOPIC_0000001839222057__table1893111404012"></a><a name="table1893111404012"></a>
           <table cellpadding="4" cellspacing="0" summary="" id="ZH-CN_TOPIC_0000001839222057__table1893111404012" frame="border" border="1" rules="all">
            <caption>
             <b>表2 </b>表级恢复GaussDB(DWS)
            </caption>
            <colgroup>
             <col style="width:32.019999999999996%">
             <col style="width:67.97999999999999%">
            </colgroup>
            <thead align="left">
             <tr>
              <th align="left" class="cellrowborder" valign="top" width="32.019999999999996%" id="mcps1.3.4.2.4.2.1.2.1.3.3.2.3.1.1"><p>参数</p></th>
              <th align="left" class="cellrowborder" valign="top" width="67.97999999999999%" id="mcps1.3.4.2.4.2.1.2.1.3.3.2.3.1.2"><p>说明</p></th>
             </tr>
            </thead>
            <tbody>
             <tr>
              <td class="cellrowborder" valign="top" width="32.019999999999996%" headers="mcps1.3.4.2.4.2.1.2.1.3.3.2.3.1.1 "><p><span>恢复至</span></p></td>
              <td class="cellrowborder" valign="top" width="67.97999999999999%" headers="mcps1.3.4.2.4.2.1.2.1.3.3.2.3.1.2 "><p>选择恢复至<span class="uicontrol" id="ZH-CN_TOPIC_0000001839222057__zh-cn_topic_0000001839222057_zh-cn_topic_0000001397321757_uicontrol2368161003111">“<span id="ZH-CN_TOPIC_0000001839222057__zh-cn_topic_0000001839222057_text817812023912">原位置</span>”</span>或<span class="uicontrol" id="ZH-CN_TOPIC_0000001839222057__zh-cn_topic_0000001839222057_zh-cn_topic_0000001397321757_uicontrol1336819106318">“<span id="ZH-CN_TOPIC_0000001839222057__zh-cn_topic_0000001839222057_text972973113394">新位置</span>”</span>。</p></td>
             </tr>
             <tr>
              <td class="cellrowborder" valign="top" width="32.019999999999996%" headers="mcps1.3.4.2.4.2.1.2.1.3.3.2.3.1.1 "><p><span>位置</span></p></td>
              <td class="cellrowborder" valign="top" width="67.97999999999999%" headers="mcps1.3.4.2.4.2.1.2.1.3.3.2.3.1.2 "><p>当选择恢复至<span class="uicontrol" id="ZH-CN_TOPIC_0000001839222057__zh-cn_topic_0000001839222057_zh-cn_topic_0000001397321757_uicontrol13368710153111">“<span id="ZH-CN_TOPIC_0000001839222057__zh-cn_topic_0000001839222057_text10541044183913">原位置</span>”</span>时，显示原位置。</p></td>
             </tr>
             <tr>
              <td class="cellrowborder" valign="top" width="32.019999999999996%" headers="mcps1.3.4.2.4.2.1.2.1.3.3.2.3.1.1 "><p><span>目标集群</span></p></td>
              <td class="cellrowborder" valign="top" width="67.97999999999999%" headers="mcps1.3.4.2.4.2.1.2.1.3.3.2.3.1.2 "><p>当选择恢复至<span class="uicontrol" id="ZH-CN_TOPIC_0000001839222057__zh-cn_topic_0000001839222057_zh-cn_topic_0000001397321757_uicontrol136861033116">“<span id="ZH-CN_TOPIC_0000001839222057__zh-cn_topic_0000001839222057_text0153529408">新位置</span>”</span>时，选择需要恢复的目标集群。您需要确认已将目标集群的安装配置文件（mppdb-install-config.xml，如果安装配置文件不为该名称，请重命名为该名称）复制到目标集群每个节点的/opt/DataBackup/目录下，并确保数据库用户有可读权限，否则会恢复失败。</p></td>
             </tr>
            </tbody>
           </table>
          </div></li>
         <li>单击<span class="uicontrol">“<span>确定</span>”</span>。</li>
         <li>系统弹出如下提示，确认提示内容后，单击<span class="uicontrol">“<span>确定</span>”</span>。<p><span><img src="zh-cn_image_0000001792343290.png"></span></p> <p></p></li>
        </ol>
        <div class="note">
         <img src="public_sys-resources/note_3.0-zh-cn.png"><span class="notetitle"> </span>
         <div class="notebody">
          <p>表级GDS恢复时，恢复目标端启动的GDS数量必须大于或等于源端备份时启动的GDS数量。</p>
         </div>
        </div></li>
      </ol> <p></p></li>
    </ol>
   </div>
  </div>
  <div>
   <div class="familylinks">
    <div class="parentlink">
     <strong>父主题：</strong> <a href="zh-cn_topic_0000001792343022.html">恢复</a>
    </div>
   </div>
  </div>
 </body>
</html>